package top.iflyoung.cim.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author liguiyang
 * @description 私聊的记录实体类
 * @sine 1.8
 * @date 2021/9/220:52
 **/
@Data
@TableName("p2p_chat_message")
public class P2PChatMessage extends Model<P2PChatMessage> {
    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;
    /**
     * 发送人ID
     */
    @TableField("SenderID")
    private Long senderId;
    /**
     * 接收者ID
     */
    @TableField("RecevierID")
    private Long receiverId;
    /**
     * 消息内容
     */
    @TableField("Message")
    private String message;
    /**
     * 创建时间
     */
    @TableField("CreateTime")
    private Date createTime;
    /**
     * 消息类型
     */
    @TableField("MessageType")
    private Integer messageType;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
